import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_class2/3681/accountRelated/ResetPWPage2.dart';
import 'package:flutter_class2/common/global.dart';
import 'package:toast/toast.dart';

import 'MainPage.dart';
import 'accountRelated/account_controller.dart';

class AboutPage extends StatelessWidget {
  Widget build(BuildContext context){
    return AboutPageState();
  }
}

class AboutPageState extends StatefulWidget {
  @override
  _AboutPageState createState() => new _AboutPageState();
}

class _AboutPageState extends State<AboutPageState> {

  @override

  Widget build(BuildContext context) {

    final logo = Hero(// 创建hero动画，沟通两个组件之间的tag必须统一
      tag: 'headPic',
      child: CircleAvatar(
        backgroundColor: Colors.transparent,
        radius: 48.0,
        child: ClipRRect(
          borderRadius: BorderRadius.all(Radius.circular(90)),
          child: Image.asset('images/meng.png'),
        ),
      ),
    );

    final About = Text(
      "> 关于此应用 <\n\n开发者：码蚁CodeAnt\n学号：5120183681",
      textAlign: TextAlign.center,
    );


    return Scaffold(
      backgroundColor: Colors.white,
      body: Center(
        child: Container(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Expanded(
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      logo,
                      SizedBox(height: 48.0),
                      About,
                    ],
                  ),
              ),
              Align(
                alignment: Alignment.bottomRight,
                child: Image.asset('images/miku.gif'),
              ),
            ],
          ),
        )
      ),
    );
  }
}